package com.phone.exception;

/**
 * Created by tisen on 2017/8/21.
 */
public class ErrorException extends Exception {

    private int error_code;
    private String error_message;

    public ErrorException() {
        this(0);
    }

    public ErrorException(int error_code) {
        this.error_code = error_code;
        this.error_message = ErrorCode.getErrorMessage(error_code);
    }

    public int getError_code() {
        return error_code;
    }

    public String getError_message() {
        return error_message;
    }

    @Override
    public String getMessage() {
        return getError_message() + "";
    }
}
